<?php
session_start();

if (!isset($_SESSION["userID"]))
	header("location: login.php");

require_once '../lib/ServicoNoticia.php';

$result = "";
if (isset($_REQUEST["id"]))
	$result = ServicoNoticia::deletarNoticia($_REQUEST["id"]);

if ($result=="")
	header("location: listarNoticias.php");
else
	print('<script>javascript:history.go(-1)"</script>');

?>